<div class="grid50"><div class="rad">
<table class="grids">
	<thead>
		<tr>
			<th colspan="2">Infomasi Pemilik</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>Nama</td>
			<td><input type="text" name="owner_name" value="<?php echo $init["owner"]["owner_name"]; ?>" size="45" required /></td>
		</tr>
		<tr>
			<td>Gender</td>
			<td>
				<?php
					foreach ($complement["gender"] as $key) {
						if($key["field_val"] == $init["owner"]["owner_gender"]) {
							echo '<input type="radio" name="owner_gender" id="gender_'.$key["field_key"].'" value="'.$key["field_val"].'" checked="checked"> ';
							echo '<label for="gender_'.$key["field_key"].'">'.$key["field_val"].'</label> ';
						}
						else {
							echo '<input type="radio" name="owner_gender" id="gender_'.$key["field_key"].'" value="'.$key["field_val"].'"> ';
							echo '<label for="gender_'.$key["field_key"].'">'.$key["field_val"].'</label> ';
						}
					}
				?>

			</td>
		</tr>
		<tr>
			<td>Tempat Lahir</td>
			<td><input type="text" name="owner_birth_place" value="<?php if(isset($init["owner"]["owner_birth_place"])) echo $init["owner"]["owner_birth_place"];  ?>" size="30" /></td>
		</tr>
		<tr>
			<td>Tanggal Lahir</td>
			<td><input type="text" name="owner_birth_date" class="datepicker" value="<?php if(isset($init["owner"]["owner_birth_date"])) echo $init["owner"]["owner_birth_date"];  ?>" readonly="readonly" width="15" /></td>
		</tr>
		<tr>
			<td>Agama</td>
			<td>
				<select name="owner_religion">
					<?php 
						foreach ($complement["religion"] as $key) {
							if($key["field_val"] == $init["owner"]["owner_religion"])
								{ echo '<option value="'.$key["field_val"].'" selected="selected" >'.$key["field_val"].'</option>'; }
							else
								{ echo '<option value="'.$key["field_val"].'">'.$key["field_val"].'</option>'; }
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Email</td>
			<td><input type="text" name="owner_email" value="<?php echo $init["owner"]["owner_email"]; ?>" size="45" /></td>
		</tr>
		<tr>
			<td>Nomor Telepon</td>
			<td><input type="tel" name="owner_phone" size="20" value="<?php echo $init["owner"]["owner_phone"]; ?>" placeholder="62xxx" required/></td>
		</tr>
		<tr>
			<td>Tanda Pengenal</td>
			<td>
				<select name="owner_identity_type">
					<?php 
						foreach ($complement["identity_type"] as $key) {
							if($key["field_val"] == $init["owner"]["owner_identity_type"])
								{ echo '<option value="'.$key["field_val"].'" selected="selected" >'.$key["field_val"].'</option>'; }
							else
								{ echo '<option value="'.$key["field_val"].'">'.$key["field_val"].'</option>'; }
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Nomor Tanda Pengenal</td>
			<td><input type="text" name="identity_number" value="<?php echo $init["owner"]["owner_identity_number"]; ?>" size="45" /></td>
		</tr>
	</tbody>
</table>
</div></div>

<div class="clear"></div>

<script type="text/javascript">
	$(document).ready(function() {
		$('#birth_date').datepicker({ 
			dateFormat: 'yy-mm-dd',
			defaultDate: "-25Y"
		});
	});
</script>